package com.guonl.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.guonl.bean.TipsModel;
import com.guonl.bean.User;

@RestController
@RequestMapping("/springboot")
public class HelloWorldController {

//	@Autowired
//	CallEventDemo callEventDemo;

	@Autowired
	User user;
	
	@Autowired
	TipsModel tips;

	@ResponseBody
	@RequestMapping(value = "/{name}", method = RequestMethod.GET)
	public String sayWorld(@PathVariable("name") String name) {
		System.out.println(user.toString());
		System.out.println(tips.toString());
		return "Hello " + name;
	}

}
